import 'package:json_annotation/json_annotation.dart';

import 'axis.dart';
import 'axis_pointer.dart';
import 'line_style.dart';
import 'text_style.dart';

part 'radius_axis.g.dart';

@JsonSerializable(includeIfNull: false, explicitToJson: true)
class RadiusAxisLine {
  var show;
  var symbol;
  var symbolSize;
  var symbolOffset;
  LineStyle? lineStyle;
  RadiusAxisLine({
    this.show,
    this.symbol,
    this.symbolSize,
    this.symbolOffset,
    this.lineStyle,
  });

  factory RadiusAxisLine.fromJson(Map<String, dynamic> json) =>
      _$RadiusAxisLineFromJson(json);

  Map<String, dynamic> toJson() => _$RadiusAxisLineToJson(this);
}

@JsonSerializable(includeIfNull: false, explicitToJson: true)
class RadiusAxisData {
  var value;
  TextStyle? textStyle;
  RadiusAxisData({
    this.value,
    this.textStyle,
  });
  factory RadiusAxisData.fromJson(Map<String, dynamic> json) =>
      _$RadiusAxisDataFromJson(json);

  Map<String, dynamic> toJson() => _$RadiusAxisDataToJson(this);
}

@JsonSerializable(includeIfNull: false, explicitToJson: true)
class RadiusAxisTick {
  var show;
  var alignWithLabel;
  var interval;
  var inside;
  var length;
  LineStyle? lineStyle;
  RadiusAxisTick({
    this.show,
    this.alignWithLabel,
    this.interval,
    this.inside,
    this.length,
    this.lineStyle,
  });

  factory RadiusAxisTick.fromJson(Map<String, dynamic> json) =>
      _$RadiusAxisTickFromJson(json);

  Map<String, dynamic> toJson() => _$RadiusAxisTickToJson(this);
}

@JsonSerializable(includeIfNull: false, explicitToJson: true)
class RadiusAxis {
  var id;
  var polarIndex;
  var type;
  var name;
  var nameLocation;
  var nameTextStyle;
  var nameGap;
  var nameRotate;
  var inverse;
  var boundaryGap;
  var min;
  var max;
  var scale;
  var splitNumber;
  var minInterval;
  var maxInterval;
  var interval;
  var logBase;
  var silent;
  var triggerEvent;
  RadiusAxisLine? axisLine;
  RadiusAxisTick? axisTick;
  MinorTick? minorTick;
  AxisLabel? axisLabel;
  SplitLine? splitLine;
  MinorSplitLine? minorSplitLine;
  List<RadiusAxisData>? data;
  SplitArea? splitArea;
  AxisPointer? axisPointer;

  var zlevel;
  var z;
  RadiusAxis({
    this.id,
    this.polarIndex,
    this.type,
    this.name,
    this.nameLocation,
    this.nameTextStyle,
    this.nameGap,
    this.nameRotate,
    this.inverse,
    this.boundaryGap,
    this.min,
    this.max,
    this.scale,
    this.splitNumber,
    this.minInterval,
    this.maxInterval,
    this.interval,
    this.logBase,
    this.silent,
    this.triggerEvent,
    this.minorTick,
    this.axisLabel,
    this.splitLine,
    this.minorSplitLine,
    this.splitArea,
    this.axisPointer,
    this.zlevel,
    this.z,
  });

  factory RadiusAxis.fromJson(Map<String, dynamic> json) =>
      _$RadiusAxisFromJson(json);

  Map<String, dynamic> toJson() => _$RadiusAxisToJson(this);
}
